ACTOR "VorpalBlade" : FighterWeapon// Replaces FWeaponPiece2
{
	Weapon.Ammotype1 Mana2
	Weapon.Ammouse1 5
	weapon.ammogive1 0
	Weapon.Ammotype2 Mana2
	Weapon.Ammouse2 3
	weapon.ammogive2 0
	+AXEBLOOD
	+WEAPON.AMMO_OPTIONAL
	+WEAPON.ALT_AMMO_OPTIONAL
	Weapon.KickBack 100
	Weapon.SelectionOrder 1
	Tag "Vorpal Blade"
	+UNDROPPABLE
	+MELEEWEAPON
	Inventory.Pickupmessage "VORPAL BLADE"
	Weapon.BobStyle InverseSmooth
    Weapon.BobSpeed 2.1
    Weapon.BobRangeY 0.4
    Weapon.BobRangeX 0.7
	States
	{
	Spawn:
		WVBL A -1 Bright
		Stop
	Ready:
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD A 0 A_JumpIfInventory("Mana2",4,2)
		SWRD A 1 A_WeaponReady
		Loop
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD K 1 A_WeaponReady
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD K 1 A_WeaponReady
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD K 1 A_WeaponReady
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD L 1 A_WeaponReady
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD L 1 A_WeaponReady
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD L 1 A_WeaponReady
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD M 1 A_WeaponReady
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD M 1 A_WeaponReady
		SWRD A 0 A_JumpIfInventory("MightyBlowing", 1, "MightyBlow")
		SWRD A 0 A_JumpIfInventory("DeathBlowing", 1, "DeathBlow")
		SWRD M 1 A_WeaponReady
		Loop
	Deselect:
		SWRD A 0 A_JumpIfInventory("Mana2",4,3)
		SWRD A 1 A_Lower
		TNT1 A 0 A_Lower
		Goto DeSelect+1
		SWRD K 1 A_Lower
		SWRD K 0 A_Lower
		SWRD K 1 A_Lower
		SWRD K 0 A_Lower
		SWRD K 1 A_Lower
		SWRD K 0 A_Lower
		SWRD L 1 A_Lower
		SWRD L 0 A_Lower
		SWRD L 1 A_Lower
		SWRD L 0 A_Lower
		SWRD L 1 A_Lower
		SWRD L 0 A_Lower
		SWRD M 1 A_Lower
		SWRD M 0 A_Lower
		SWRD M 1 A_Lower
		SWRD M 0 A_Lower
		SWRD M 1 A_Lower
		SWRD M 0 A_Lower
		Goto Deselect+3
	Select:
		SWRD A 0 A_JumpIfInventory("Mana2",4,3)
		SWRD A 1 A_Raise
		TNT1 A 0 A_Raise
		Goto Select+1
		SWRD K 1 A_Raise
		SWRD K 0 A_Raise
		SWRD K 1 A_Raise
		SWRD K 0 A_Raise
		SWRD K 1 A_Raise
		SWRD K 0 A_Raise
		SWRD L 1 A_Raise
		SWRD L 0 A_Raise
		SWRD L 1 A_Raise
		SWRD L 0 A_Raise
		SWRD L 1 A_Raise
		SWRD L 0 A_Raise
		SWRD M 1 A_Raise
		SWRD M 0 A_Raise
		SWRD M 1 A_Raise
		SWRD M 0 A_Raise
		SWRD M 1 A_Raise
		SWRD M 0 A_Raise
		Goto Select+3
	Fire:
		TNT1 A 0 A_JumpIfInventory("Mana2", 5, "GFire")
		TNT1 A 0 A_JumpIfInventory("Mana2", 3, "GAltFire")
	MeleeSwing:
		SWRD A 0 offset(5,42) A_JumpIfInventory("CriticalStrike",Random(1,40),"MeleeSwingCrit")
		SWRD B 1 offset(5,42)
		SWRD C 1 offset(15,35) A_PlaySound("FighterSwordMiss", 8, 1.0, 0)
		SWRD C 1 offset(1,35)
		SWRD D 1 offset(1,35)
		SWRD D 0 offset(-15,35) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, ACTIVATOR),"VorpalBladePuff",FBF_NORANDOM,150)
		SWRD D 1 offset(-15,35)  
		SWRD E 1 offset(1,35) 
		SWRD E 1 offset(-15,35)
		SWRD F 1 offset(1,35)
		SWRD F 1 offset(-15,35)
		TNT1 a 10
		TNT1 a 0 a_refire
		SWRD A 1 offset(5,60)
		SWRD A 1 offset(5,55)
		SWRD A 1 offset(5,50)
		SWRD A 1 offset(5,45)
		SWRD A 1 offset(5,40)
		Goto Ready
	MeleeSwingCrit:
		SWRD B 1 offset(5,42)
		SWRD C 1 offset(15,35) A_PlaySound("FighterSwordMiss", 8, 1.0, 0)
		SWRD C 1 offset(1,35)
		SWRD D 1 offset(1,35)
		SWRD P 0 offset(-15,35) A_FireBullets(0,0,1,0,"CriticalPuff",FBF_NORANDOM,150)
		SWRD D 0 offset(-15,35) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", 2*FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, ACTIVATOR),"VorpalBladePuff",FBF_NORANDOM,150)
		SWRD D 1 offset(-15,35)  
		SWRD E 1 offset(1,35) 
		SWRD E 1 offset(-15,35)
		SWRD F 1 offset(1,35)
		SWRD F 1 offset(-15,35)
		TNT1 a 10
		TNT1 a 0 a_refire
		SWRD A 1 offset(5,60)
		SWRD A 1 offset(5,55)
		SWRD A 1 offset(5,50)
		SWRD A 1 offset(5,45)
		SWRD A 1 offset(5,40)
		Goto Ready
	GFire:
		SWRD A 0 A_JumpIfInventory("CriticalStrike",Random(1,40),"Fire2")
		SWRD N 1 offset(5,42)
		SWRD O 1 offset(15,30) A_PlaySound("FighterSwordMiss", 8, 1.0, 0)
		SWRD O 1 offset(1,35)
		SWRD P 1 offset(1,35)
		SWRD P 0 offset(-15,35)
		SWRD P 0 offset(-15,35) A_FireCustomMissile("VorpalBladeSlash")
		SWRD P 0 offset(-15,35) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, ACTIVATOR),"VorpalBladeBleedPuff",FBF_NORANDOM,150)
		SWRD P 1 offset(-15,35)  
		SWRD Q 1 offset(1,35) 
		SWRD Q 1 offset(-15,35)
		SWRD R 1 offset(1,35)
		SWRD R 1 offset(-15,35)
		TNT1 a 10
		TNT1 a 0 a_refire
		SWRD U 1 offset(5,60)
		SWRD U 1 offset(5,55)
		SWRD V 1 offset(5,50)
		SWRD V 1 offset(5,45)
		SWRD V 1 offset(5,40)
		Goto Ready
	Fire2:
		SWRD N 1 offset(5,42)
		SWRD O 1 offset(15,35) A_PlaySound("FighterSwordMiss", 8, 1.0, 0)
		SWRD O 1 offset(1,35)
		SWRD P 1 offset(1,35)
		SWRD P 0 offset(-15,35)
		SWRD P 0 offset(-15,35) A_FireCustomMissile("VorpalBladeSlash")
		SWRD P 0 offset(-15,35) A_FireBullets(0,0,1,0,"CriticalPuff",FBF_NORANDOM,150)
		SWRD P 0 offset(-15,35) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", 2*FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, ACTIVATOR),"VorpalBladeBleedPuffCrit",FBF_NORANDOM,150)
		SWRD P 1 offset(-15,35)  
		SWRD Q 1 offset(1,35) 
		SWRD Q 1 offset(-15,35)
		SWRD R 1 offset(1,35)
		SWRD R 1 offset(-15,35)
		TNT1 a 10
		TNT1 a 0 a_refire
		SWRD U 1 offset(5,60)
		SWRD U 1 offset(5,55)
		SWRD V 1 offset(5,50)
		SWRD V 1 offset(5,45)
		SWRD V 1 offset(5,40)
		Goto Ready
	Altfire:
		TNT1 A 0 A_JumpIfInventory("Mana2", 3, "GAltFire")
		Goto MeleeSwing
	GAltfire:
		SWRD A 0 offset(5,42) A_JumpIfInventory("CriticalStrike",Random(1,40),"Altfire2")
		SWRD N 1 offset(5,42)
		SWRD O 1 offset(15,35) A_PlaySound("FighterSwordMiss", 8, 1.0, 0)
		SWRD O 1 offset(1,35)
		SWRD P 1 offset(1,35)
		SWRD P 0 offset(-15,35) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, ACTIVATOR),"VorpalBladeAltBleedPuff",FBF_NORANDOM,150)
		SWRD P 1 offset(-15,35)  
		SWRD Q 1 offset(1,35) 
		SWRD Q 1 offset(-15,35)
		SWRD R 1 offset(1,35)
		SWRD R 1 offset(-15,35)
		TNT1 a 10
		TNT1 a 0 a_refire
		SWRD U 1 offset(5,60)
		SWRD U 1 offset(5,55)
		SWRD V 1 offset(5,50)
		SWRD V 1 offset(5,45)
		SWRD V 1 offset(5,40)
		Goto Ready
	AltFire2:
		SWRD N 1 offset(5,42)
		SWRD O 1 offset(15,35) A_PlaySound("FighterSwordMiss", 8, 1.0, 0)
		SWRD O 1 offset(1,35)
		SWRD P 1 offset(1,35)
		SWRD P 0 offset(-15,35) A_FireBullets(0,0,1,0,"CriticalPuff",FBF_NORANDOM,150)
		SWRD P 0 offset(-15,35) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", 2*FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, ACTIVATOR),"VorpalBladeAltBleedPuffCrit",FBF_NORANDOM,150)
		SWRD P 1 offset(-15,35)  
		SWRD Q 1 offset(1,35) 
		SWRD Q 1 offset(-15,35)
		SWRD R 1 offset(1,35)
		SWRD R 1 offset(-15,35)
		TNT1 a 10
		TNT1 a 0 a_refire
		SWRD U 1 offset(5,60)
		SWRD U 1 offset(5,55)
		SWRD V 1 offset(5,50)
		SWRD V 1 offset(5,45)
		SWRD V 1 offset(5,40)
		Goto Ready
	MightyBlow:
		SWRD A 1 Offset (0, 40)
		SWRD A 1 Offset (0, 48)
		SWRD A 1 Offset (0, 56)
		FPCH E 1 Offset(220,60)
		FPCH E 1 Offset(225,50)
		FPCH E 1 Offset(220,50)
		FPCH E 1 Offset(210,50)
		FPCH E 1 Offset(190,50)
		FPCH E 1 Offset(180,40) 
		FPCH E 1 Offset(95,40)
		FPCH D 0 Offset (5, 40) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(140,180), STRENGTH, ABIL_MIGHTYBLOW, ACTIVATOR),"MightyBlowPuff",FBF_NORANDOM,128)
		FPCH E 1 Offset(10,50)
		FPCH E 1 Offset(5,60) 
		FPCH E 1 Offset(2,70)
		FPCH E 1 Offset(0,80)
		FPCH E 1 Offset(2,90) 
		FPCH E 1 Offset(5,115)
		FPCH E 5 Offset(0,150) A_TakeInventory("MightyBlowing",2)
		SWRD A 1 Offset (1, 56)
		SWRD A 1 Offset (1, 48)
		SWRD A 1 Offset (1, 40)
		Goto Ready
	DeathBlow:
		SWRD A 1 Offset (0, 40)
		SWRD A 1 Offset (0, 48)
		SWRD A 1 Offset (0, 56)
		FPCH E 1 Offset(220,60)
		FPCH E 1 Offset(225,50)
		FPCH E 1 Offset(220,50)
		FPCH E 1 Offset(210,50)
		FPCH E 1 Offset(190,50)
		FPCH E 1 Offset(180,40) 
		FPCH E 1 Offset(95,40)
		FPCH E 0 A_JumpIfInventory("DeathBlow", random(0,25), 2)
		FPCH E 0 A_Jump(256,2)
		FPCH E 0 A_FireBullets(0,0,1,1000000,"DeathBlowPuff",FBF_NORANDOM,128)
		FPCH E 0 A_FireBullets(0,0,1,0,"HammerPuff",FBF_NORANDOM,128)
		FPCH E 1 Offset(10,50)
		FPCH E 1 Offset(5,60) 
		FPCH E 1 Offset(2,70)
		FPCH E 1 Offset(0,80)
		FPCH E 1 Offset(2,90) 
		FPCH E 1 Offset(5,115)
		FPCH E 5 Offset(0,150) A_TakeInventory("DeathBlowing",2)
		SWRD A 1 Offset (1, 56)
		SWRD A 1 Offset (1, 48)
		SWRD A 1 Offset (1, 40)
		Goto Ready
	}
}

ACTOR VorpalBladeSlash
{
	Radius 8
	Height 16
	Speed 25
	Damagetype "Physical"
	PROJECTILE
	RENDERSTYLE ADD
	ALPHA 0.75
	Reactiontime 15
	+RIPPER
	+NODAMAGETHRUST
	+MTHRUSPECIES +NODAMAGETHRUST
	+DONTBLAST
	+FORCERADIUSDMG
	States
	{
	Spawn:
		VFX4 A 0 Bright A_SpawnItem("SlashTrail",0,0)
		VFX4 A 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 15, STRENGTH, ABIL_SWORDMASTERY, WOCTARGET),30,0,0,30)
		VFX4 A 1 Bright A_Countdown
		Loop
	Death:
		VFX4 A 1 Bright
		Stop
	}
}

ACTOR SlashTrail
{
	Radius 3
	Height 3
	PROJECTILE
	+MTHRUSPECIES +NODAMAGETHRUST
	+DONTBLAST
	+CLIENTSIDEONLY
	+NOINTERACTION
	RENDERSTYLE ADD
	ALPHA 0.80
	States
	{
	Spawn:
		NULL A 1
		VFX4 A 1 Bright A_FadeOut(0.10)
		Goto Spawn+1
	}
}

Actor VorpalBladePuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFONACTORS
	+PUFFGETSOWNER
	+THRUGHOST
	+MTHRUSPECIES
	Radius 8
	Height 12
	Alpha 0.6
	Renderstyle Translucent
	SeeSound "FighterSwordHitThing"
	AttackSound "FighterSwordHitWall"
	//ActiveSound "FighterSwordMiss"
	Damagetype "Physical"

	States
	{
	Spawn:
	Melee:
		FHFX S 0
		FHFX S 0 A_JumpIfInTargetInventory("IsDestroyer",1,"Fury")
		Goto Crash
	Fury:
		FHFX S 0 A_GiveToTarget("FuryItem",1)
	Crash:
		FHFX S 1
		FHFX S 1 A_GiveToTarget("ScreenPitch2")
		FHFX SS 1 A_GiveToTarget("ScreenPitch1Back")
		FHFX TUVW 4
		Stop
	}
}

Actor VorpalBladeBleedPuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFONACTORS
	+PUFFGETSOWNER
	+MTHRUSPECIES
	+HITTRACER
	Radius 8
	Height 12
	RenderStyle Add
    Scale 0.5
	SeeSound "FighterSwordHitThing"
	AttackSound "FighterSwordHitWall"
	//ActiveSound "FighterSwordMiss"
	Damagetype "Physical"

	States
	{
	Spawn:
	Melee:
		VRPP A 0
		VRPP A 0 A_JumpIfInTargetInventory("IsDestroyer",1,"Fury")
		Goto Crash
	Fury:
		VRPP A 0 A_GiveToTarget("FuryItem",1)
	Crash:
		VRPP A 1 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, WOCTARGET), 10, PHYSICALDOT)
		VRPP B 1 Bright A_GiveToTarget("ScreenPitch2")
		VRPP CD 1 Bright A_GiveToTarget("ScreenPitch1Back")
		VRPP EFGHIJKLMNOPQR 1 Bright
		Stop
	}
}

Actor VorpalBladeBleedPuffCrit : VorpalBladeBleedPuff
{
	States
	{
	Spawn:
	Melee:
		VRPP A 0
		VRPP A 0 A_JumpIfInTargetInventory("IsDestroyer",1,"Fury")
		Goto Crash
	Fury:
		VRPP A 0 A_GiveToTarget("FuryItem",1)
	Crash:
		VRPP A 1 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", 2*FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, WOCTARGET), 10, PHYSICALDOT)
		VRPP B 1 Bright A_GiveToTarget("ScreenPitch2")
		VRPP CD 1 Bright A_GiveToTarget("ScreenPitch1Back")
		VRPP EFGHIJKLMNOPQR 1 Bright
		Stop
	}
}

Actor VorpalBladeAltBleedPuff : VorpalBladeBleedPuff
{
	States
	{
	Spawn:
	Melee:
		VRPP A 0
		VRPP A 0 Bright A_TakeFromTarget("Mana2", 3, TIF_NOTAKEINFINITE)
		VRPP A 0 A_JumpIfInTargetInventory("IsDestroyer",1,"Fury")
		Goto Crash
	Fury:
		VRPP A 0 A_GiveToTarget("FuryItem",1)
	Crash:
		VRPP A 1 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, WOCTARGET), 10, PHYSICALDOT)
		VRPP B 1 Bright A_GiveToTarget("ScreenPitch2")
		VRPP CD 1 Bright A_GiveToTarget("ScreenPitch1Back")
		VRPP EFGHIJKLMNOPQR 1 Bright
		Stop
	}
}

Actor VorpalBladeAltBleedPuffCrit : VorpalBladeBleedPuff
{
	States
	{
	Spawn:
	Melee:
		VRPP A 0
		VRPP A 0 A_TakeFromTarget("Mana2", 3, TIF_NOTAKEINFINITE)
		VRPP A 0 A_JumpIfInTargetInventory("IsDestroyer",1,"Fury")
		Goto Crash
	Fury:
		VRPP A 0 A_GiveToTarget("FuryItem",1)
	Crash:
		VRPP A 1 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", 2*FRandom(40,62), STRENGTH, ABIL_SWORDMASTERY, WOCTARGET), 10, PHYSICALDOT)
		VRPP B 1 Bright A_GiveToTarget("ScreenPitch2")
		VRPP CD 1 Bright A_GiveToTarget("ScreenPitch1Back")
		VRPP EFGHIJKLMNOPQR 1 Bright
		Stop
	}
}